Optimal. Leaf size=316 \[ -\frac {4 a \tanh ^{-1}(\sin (c+d x))}{b^5 d}+\frac {a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^5 (a+b)^{7/2} d}+\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.76, antiderivative size = 316, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 9, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.429, Rules used = {3930, 4183,
4175, 4167, 4083, 3855, 3916, 2738, 214} \begin {gather*} -\frac {a^2 \tan (c+d x) \sec ^3(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \tan (c+d x) \sec ^2(c+d x)}{6 b^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))^2}+\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 d \left (a^2-b^2\right )^2}+\frac {a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^5 d (a-b)^{7/2} (a+b)^{7/2}}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 d \left (a^2-b^2\right )^3 (a+b \sec (c+d x))}-\frac {4 a \tanh ^{-1}(\sin (c+d x))}{b^5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 214
Rule 2738
Rule 3855
Rule 3916
Rule 3930
Rule 4083
Rule 4167
Rule 4175
Rule 4183
Rubi steps
\begin {align*} \int \frac {\sec ^6(c+d x)}{(a+b \sec (c+d x))^4} \, dx &=-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {\int \frac {\sec ^3(c+d x) \left (3 a^2-3 a b \sec (c+d x)-\left (4 a^2-3 b^2\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx}{3 b \left (a^2-b^2\right )}\\ &=-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {\int \frac {\sec ^2(c+d x) \left (-2 a^2 \left (4 a^2-9 b^2\right )+2 a b \left (a^2-6 b^2\right ) \sec (c+d x)+\left (12 a^4-23 a^2 b^2+6 b^4\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2} \, dx}{6 b^2 \left (a^2-b^2\right )^2}\\ &=-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac {\int \frac {\sec (c+d x) \left (-3 a^2 b \left (4 a^4-11 a^2 b^2+12 b^4\right )-a \left (12 a^6-37 a^4 b^2+43 a^2 b^4-18 b^6\right ) \sec (c+d x)+b \left (a^2-b^2\right ) \left (12 a^4-23 a^2 b^2+6 b^4\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{6 b^4 \left (a^2-b^2\right )^3}\\ &=\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac {\int \frac {\sec (c+d x) \left (-3 a^2 b^2 \left (4 a^4-11 a^2 b^2+12 b^4\right )-24 a b \left (a^2-b^2\right )^3 \sec (c+d x)\right )}{a+b \sec (c+d x)} \, dx}{6 b^5 \left (a^2-b^2\right )^3}\\ &=\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac {(4 a) \int \sec (c+d x) \, dx}{b^5}+\frac {\left (a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right )\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 b^5 \left (a^2-b^2\right )^3}\\ &=-\frac {4 a \tanh ^{-1}(\sin (c+d x))}{b^5 d}+\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac {\left (a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right )\right ) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{2 b^6 \left (a^2-b^2\right )^3}\\ &=-\frac {4 a \tanh ^{-1}(\sin (c+d x))}{b^5 d}+\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac {\left (a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right )\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^6 \left (a^2-b^2\right )^3 d}\\ &=-\frac {4 a \tanh ^{-1}(\sin (c+d x))}{b^5 d}+\frac {a^2 \left (8 a^6-28 a^4 b^2+35 a^2 b^4-20 b^6\right ) \tanh ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^5 (a+b)^{7/2} d}+\frac {\left (12 a^4-23 a^2 b^2+6 b^4\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}-\frac {a^2 \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}-\frac {a^2 \left (4 a^2-9 b^2\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {a^3 \left (4 a^4-11 a^2 b^2+12 b^4\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 6.24, size = 416, normalized size = 1.32 \begin {gather*} -\frac {a^2 \left (-8 a^6+28 a^4 b^2-35 a^2 b^4+20 b^6\right ) \tanh ^{-1}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b^5 \sqrt {a^2-b^2} \left (-a^2+b^2\right )^3 d}+\frac {4 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^5 d}-\frac {4 a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}{b^5 d}+\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{b^4 d \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )}+\frac {\sin \left (\frac {1}{2} (c+d x)\right )}{b^4 d \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}-\frac {a^3 \sin (c+d x)}{3 b^2 (-a+b) (a+b) d (b+a \cos (c+d x))^3}+\frac {6 a^5 \sin (c+d x)-11 a^3 b^2 \sin (c+d x)}{6 b^3 (-a+b)^2 (a+b)^2 d (b+a \cos (c+d x))^2}+\frac {-18 a^7 \sin (c+d x)+50 a^5 b^2 \sin (c+d x)-47 a^3 b^4 \sin (c+d x)}{6 b^4 (-a+b)^3 (a+b)^3 d (b+a \cos (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.43, size = 425, normalized size = 1.34
method | result | size |
derivativedivides | \(\frac {-\frac {1}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {4 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}-\frac {2 a^{2} \left (\frac {\frac {\left (6 a^{4}-2 b \,a^{3}-18 b^{2} a^{2}+5 b^{3} a +20 b^{4}\right ) b a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 b \,a^{2}+3 b^{2} a +b^{3}\right )}-\frac {2 \left (9 a^{4}-29 b^{2} a^{2}+30 b^{4}\right ) b a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 b a +b^{2}\right ) \left (a^{2}-2 b a +b^{2}\right )}+\frac {\left (6 a^{4}+2 b \,a^{3}-18 b^{2} a^{2}-5 b^{3} a +20 b^{4}\right ) b a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 b \,a^{2}+3 b^{2} a -b^{3}\right )}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )^{3}}-\frac {\left (8 a^{6}-28 a^{4} b^{2}+35 a^{2} b^{4}-20 b^{6}\right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{5}}-\frac {1}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {4 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}}{d}\) | \(425\) |
default | \(\frac {-\frac {1}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}-\frac {4 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}-\frac {2 a^{2} \left (\frac {\frac {\left (6 a^{4}-2 b \,a^{3}-18 b^{2} a^{2}+5 b^{3} a +20 b^{4}\right ) b a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 \left (a -b \right ) \left (a^{3}+3 b \,a^{2}+3 b^{2} a +b^{3}\right )}-\frac {2 \left (9 a^{4}-29 b^{2} a^{2}+30 b^{4}\right ) b a \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 \left (a^{2}+2 b a +b^{2}\right ) \left (a^{2}-2 b a +b^{2}\right )}+\frac {\left (6 a^{4}+2 b \,a^{3}-18 b^{2} a^{2}-5 b^{3} a +20 b^{4}\right ) b a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 b \,a^{2}+3 b^{2} a -b^{3}\right )}}{\left (a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-a -b \right )^{3}}-\frac {\left (8 a^{6}-28 a^{4} b^{2}+35 a^{2} b^{4}-20 b^{6}\right ) \arctanh \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{b^{5}}-\frac {1}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {4 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}}{d}\) | \(425\) |
risch | \(\text {Expression too large to display}\) | \(1306\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 1000 vs.
\(2 (299) = 598\).
time = 7.76, size = 2058, normalized size = 6.51 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{6}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{4}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.55, size = 592, normalized size = 1.87 \begin {gather*} -\frac {\frac {3 \, {\left (8 \, a^{8} - 28 \, a^{6} b^{2} + 35 \, a^{4} b^{4} - 20 \, a^{2} b^{6}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{6} b^{5} - 3 \, a^{4} b^{7} + 3 \, a^{2} b^{9} - b^{11}\right )} \sqrt {-a^{2} + b^{2}}} + \frac {18 \, a^{9} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 42 \, a^{8} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 24 \, a^{7} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 117 \, a^{6} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 24 \, a^{5} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 105 \, a^{4} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 60 \, a^{3} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 36 \, a^{9} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 152 \, a^{7} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 236 \, a^{5} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 120 \, a^{3} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 18 \, a^{9} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 42 \, a^{8} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, a^{7} b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 117 \, a^{6} b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 24 \, a^{5} b^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 105 \, a^{4} b^{5} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 60 \, a^{3} b^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{6} b^{4} - 3 \, a^{4} b^{6} + 3 \, a^{2} b^{8} - b^{10}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a - b\right )}^{3}} + \frac {12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{b^{5}} - \frac {12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{b^{5}} + \frac {6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} b^{4}}}{3 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 10.36, size = 2500, normalized size = 7.91 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________